package com.beiming.libra.domain.dto.requestdto;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import com.beiming.libra.common.constants.LibraConst;
import com.beiming.libra.common.constants.ValidateMessage;
import com.beiming.libra.common.enums.PlatformEnum;
import com.beiming.libra.common.enums.UserTypeEnum;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 短信验证码登录
 * 
 * @author weibo
 */
@Data
@ApiModel("短信验证码登录dto")
public class SMSLoginRequestDTO implements Serializable {
  private static final long serialVersionUID = 2848176419608122970L;
  /**
   * 平台类型(WEB[网页],WECHAT[小程序],MANAGE[后台生成],OTHER[其他])
   */
  @ApiModelProperty(value = "平台类型(WEB[网页],WECHAT[小程序],MANAGE[后台生成],OTHER[其他])", required = true)
  @NotNull(message = ValidateMessage.PLATFORM_NOT_NULL)
  private PlatformEnum platform;

  /**
   * 用户类型(PEOPLE[个人],COMPANY[企业],SPECIAL[专项用户],SECRETARY[办案秘书],
   * ARBITRATION[仲裁员],FINANCE[财务],LEADER[领导],ADMIN[系统管理员])
   * 
   */
  @ApiModelProperty(value = "用户类型(PEOPLE[个人],COMPANY[企业],SPECIAL[专项用户],SECRETARY[办案秘书], ARBITRATION[仲裁员],FINANCE[财务],LEADER[领导],ADMIN[系统管理员])", required = true)
  @NotNull(message = ValidateMessage.USER_TYPE_NOT_BLANK)
  private UserTypeEnum userType;

  /**
   * 手机号
   */
  @ApiModelProperty(value = "手机号(用户名)", required = true)
  @NotBlank(message = ValidateMessage.MOBILE_PHONE_NOT_BLANK)
  @Pattern(regexp = LibraConst.REGEX_MOBILE_EXACT, message = ValidateMessage.MOBILE_PHONE_INCORRECT)
  private String mobilePhone;
  /**
   * 短信验证码
   */
  @ApiModelProperty(value = "短信验证码", required = true)
  @NotBlank(message = ValidateMessage.SMSCODE_NOTBLANK)
  private String smsCode;
}
